home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12514 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: sprintf() question
  5. Date: Mon, 01 Apr 96 11:38:48 GMT
  6. Organization: none
  7. Message-ID: <828358728snz@genesis.demon.co.uk>
  8. References: <31593522.76B3@cbm.com> <4jhfbn$p3@reznor.larc.nasa.gov> <315F586E.662C2793@alcyone.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <315F586E.662C2793@alcyone.com>
  15.            max@alcyone.com "Erik Max Francis" writes:
  16.  
  17. >Ed Hook wrote:
  18. >
  19. >>  The Standard says that this invokes undefined behavior, so don't do it.
  20. >>  Also, you could probably have answered your own question quite simply:
  21. >
  22. >Checking whether a feature is ANSI-compliant is not going to get desired
  23. >results.
  24.  
  25. It will tell you if a piece of code is guaranteed to give you the
  26. desired results or not.
  27.  
  28. > For implementation-dependent behavior, sometimes it will do what you
  29. >want.  Sometimes it will do something strange.  And sometimes it will do
  30. >something disastrous.
  31.  
  32. And the way that you tell that something has implementation-dependent
  33. or undefined behaviour is to check it against the standard.
  34.  
  35.   And you're not guaranteed that the behavior will be
  36. >consistent from run to run.  (It may work today but crash horribly in some
  37. >curious circumstances tomorrow.)
  38.  
  39. Without the standard you don't know what you're guaranteed.
  40.  
  41. -- 
  42. -----------------------------------------
  43. Lawrence Kirby | fred@genesis.demon.co.uk
  44. Wilts, England | 70734.126@compuserve.com
  45. -----------------------------------------
  46.